package mtt;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import mtt.control.ApplicationController;

/**
 * @author hyphen
 */
public class MobileTimeTable extends MIDlet {

	/**
	 * enthält den DisplayController
	 */
	private ApplicationController applicationController;

	/**
	 * Konstruktor: startet den DisplayController und setzt das Display
	 */
	public MobileTimeTable() {

	}

	public void applicationShutdown() throws MIDletStateChangeException {
		destroyApp(true);
		notifyDestroyed();
	}

	public void destroyApp(boolean arg0) throws MIDletStateChangeException {

	}

	protected void pauseApp() {
		// TODO Auto-generated method stub

	}

	protected void startApp() throws MIDletStateChangeException {

		if (applicationController == null) {
			applicationController = ApplicationController.getInstance();
			applicationController.setDisplay(Display.getDisplay(this));
			applicationController.setMidlet(this);
		}

		applicationController.startApplication();
	}
}
